﻿using Stylet;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinsionApp.Models.Message;

namespace WinsionApp.Pages
{
    public class PageListViewModel : Screen
    {
        private readonly IEventAggregator _eventAggregator;


        public PageListViewModel(IEventAggregator eventAggregator)
        {
            _eventAggregator = eventAggregator;
        }

        public void SayHello()
        {
            var myEvent = new MyEvent
            {
                Message = "Hello from the publisher!"
            };

            _eventAggregator.Publish(myEvent); // 发布事件
        }
    }
}
